<%@ include file="/taglibs.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <script src="${ctx}/scripts/jquery-1.7.js" type="text/javascript"></script>
    <script src="${ctx}/scripts/jwplayer.js" type="text/javascript"></script>
	<script type="text/javascript">
		jwplayer("container").setup({
	        flashplayer: "JWPlayer/player.swf",
	        file: "Videos/music.mp4",
	        height: "330",
	        width: "440"
	    });
	</script>
</head>
<body >
<div class="table_title"><span style="font-family: Times New Roman,Georgia,Serif; font-size: 14px;"><b>视频播放:</b><s:property value='#request.videoName' /></span></div>
<hr /><div id="container">该视频文件播放错误</div> 
 <script type="text/javascript">
 	$(function(){
 		setInterval(alertStudent, 600000);//600秒
 	});
 	
 	function alertStudent(){
 		if(confirm("是否继续观看视频?")){
 			$.ajax({
 				url:"${ctx}/VideoAction_queryState",
 				type:"post",
 				timeout:3000,
 				success:function(data){
 					if(data == '0'){
 						window.close();
 					}
 				},
 				error: function(XmlHttpRequest, textStatus, errorThrown){
 					window.close();
 				}
 			});
 		}else{
 			window.close();
 		}
 	}
 	
     jwplayer("container").setup({
         flashplayer: "../../../scripts/player.swf",
         file: "<%=request.getAttribute("videoFullPath")%>",
         height: "330",
         width: "440"
     });
 </script>
</body>
</html>